<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>-商品详情</title>
<link rel="stylesheet" href="<c:url value='/static/plugins/jquery/plugins/bxslider/css/jquery.bxslider.css'/>">
<script src="<c:url value="/static/plugins/jquery/plugins/bxslider/js/jquery.bxslider.js" />"></script>
<script type="text/javascript" src="<c:url value='/static/js/web/product/detail.js' />"></script>
</head>

<body>
	<div class="p_page">
		<div class="footer">
			<div class="center clear" align="center">
				<div style="width: 260px;">
					<div id="cars" class="car">
						<img src="<c:url value="/static/skins/images/car.png" />">
						<span class="number-bg" style="display: none;">
							<span id="car-number" class="number">0</span>
						</span>
					</div>
					<a id="addCar" href="javascript:void(0);" class="button bg-red a-car">加入购物车</a>
					<a id="addOrder" href="javascript:void(0);" class="button bg-red">立即下单</a>
				</div>
			</div>
		</div>
		<div class="p_detail">
			<input type="hidden" id="productId" value="${product.id}"/>
			<div class="scroll_iamges">
				<div class="slider1">
					<c:if test="${!empty product.image1 }">
						<div class="slide"><img src="<c:url value="${product.image1}" />"></div>
					</c:if>
					<c:if test="${!empty product.image2 }">
						<div class="slide"><img src="<c:url value="${product.image2}" />"></div>
					</c:if>
					<c:if test="${!empty product.image3 }">
						<div class="slide"><img src="<c:url value="${product.image3}" />"></div>
					</c:if>
					<c:if test="${!empty product.image4 }">
						<div class="slide"><img src="<c:url value="${product.image4}" />"></div>
					</c:if>
					<c:if test="${!empty product.image5 }">
						<div class="slide"><img src="<c:url value="${product.image5}" />"></div>
					</c:if>
			    </div>
			</div>
			<div class="con_info">
				<div class="title">
					${product.productName}
				</div>
				<div class="briefing">
					${product.productBrief}
				</div>
				<div class="prices">
					原价：<span class="del" style="margin-right: 10px;">￥${product.marketPrice}</span>
					现价：<b class="red">￥${product.salesPrice}</b>
				</div>
				<hr/>
				<%-- <div style="margin-top: 10px">
					商品编号：<span>${product.productCode}</span><br>
				</div> --%>
				<div class="stock">
					库存：<span id="stock">${product.stock}</span>
				</div>
				<div class="number">
					<div style="float: left;">数量：</div>
					<div class="number_tool" style="float: left;">
						<div class="c_d c_subtract"></div>
						<div class="c_d c_number">
						<input id="chose-count" type="text" value="1" onblur="value=numberKeyup(this,$('#stock').text())" onkeyup="value=numberKeyup(this,$('#stock').text())" />
						</div>
						<div class="c_d c_add"></div>
					</div>
				</div>
			</div>
			<div class="con_detail">
				${product.detail}
			</div>
			<div style="height: 50px;background: #FFF;"></div>
		</div>
		<form id="orderForm" name="orderForm" action="<c:url value='/web/preSaleOrder/detail' />" method="post" >
			<input type="hidden" name="goods" id="goods">
			<input type="hidden" id="openid" name="openid" value="${openid}" />
		</form>
	</div>
</body>
</html>